import { h } from 'vue';
import { NTag } from 'naive-ui';
export const columns = [
  {
    title: 'ID',
    key: 'id',
    width: 20,
  },
  {
    title: '房间ID',
    key: 'houseId',
    width: 20,
  },
  {
    title: 'USERID',
    key: 'userId',
    width: 20,
  },
  {
    title: '入住时间',
    key: 'startTime',
    width: 40,
  },
  {
    title: '退房时间',
    key: 'endTime',
    width: 40,
  },
  {
    title: '成人数量',
    key: 'adultNum',
    width: 20,
  },
  {
    title: '儿童数量',
    key: 'childNum',
    width: 20,
  },
  {
    title: '婴儿数量',
    key: 'babyNum',
    width: 20,
  },
  {
    title: '是否已支付',
    key: 'isPay',
    width: 20,
    render(row) {
      if (row.isPay == 1) {
        return h(
          NTag,
          {
            style: {
              marginRight: '6px',
            },
            type: 'info',
            bordered: false,
          },
          {
            default: () => '已支付',
          }
        );
      } else {
        return h(
          NTag,
          {
            style: {
              marginRight: '6px',
            },
            type: 'error',
            bordered: false,
          },
          {
            default: () => '未支付',
          }
        );
      }
    },
  },
];
